home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / manageme / tcpdump-.7 / tcpdump- / tcpdump-richard-1.7 / linux-include / linux / if_arp.h
Encoding:
C/C++ Source or Header  |  1994-07-23  |  1.6 KB  |  46 lines

  1. /*    @(#)if_arp.h 1.5 88/08/19 SMI; from UCB 7.1 1/24/86    */
  2. /*
  3.  * Copyright (c) 1986 Regents of the University of California.
  4.  * All rights reserved.  The Berkeley software License Agreement
  5.  * specifies the terms and conditions for redistribution.
  6.  */
  7.  
  8. #ifndef _net_if_arp_h
  9. #define _net_if_arp_h
  10.  
  11. /*
  12.  * Address Resolution Protocol.
  13.  *
  14.  * See RFC 826 for protocol description.  ARP packets are variable
  15.  * in size; the arphdr structure defines the fixed-length portion.
  16.  * Protocol type values are the same as those for 10 Mb/s Ethernet.
  17.  * It is followed by the variable-sized fields ar_sha, arp_spa,
  18.  * arp_tha and arp_tpa in that order, according to the lengths
  19.  * specified.  Field names used correspond to RFC 826.
  20.  */
  21. struct    arphdr {
  22.     u_short    ar_hrd;        /* format of hardware address */
  23. #define ARPHRD_ETHER     1    /* ethernet hardware address */
  24.     u_short    ar_pro;        /* format of protocol address */
  25.     u_char    ar_hln;        /* length of hardware address */
  26.     u_char    ar_pln;        /* length of protocol address */
  27.     u_short    ar_op;        /* one of: */
  28. #define    ARPOP_REQUEST    1    /* request to resolve address */
  29. #define    ARPOP_REPLY    2    /* response to previous request */
  30. #define    REVARP_REQUEST    3    /* Reverse ARP request */
  31. #define    REVARP_REPLY    4    /* Reverse ARP reply */
  32.     /*
  33.      * The remaining fields are variable in size,
  34.      * according to the sizes above, and are defined
  35.      * as appropriate for specific hardware/protocol
  36.      * combinations.  (E.g., see <netinet/if_ether.h>.)
  37.      */
  38. #ifdef    notdef
  39.     u_char    ar_sha[];    /* sender hardware address */
  40.     u_char    ar_spa[];    /* sender protocol address */
  41.     u_char    ar_tha[];    /* target hardware address */
  42.     u_char    ar_tpa[];    /* target protocol address */
  43. #endif    notdef
  44. };
  45. #endif
  46.